function py=pol(p,x)
n=length(p);

xn = 1;
py = p(n);
for i=n-1:-1:1
   xn = xn.*x;
   py = py + p(i)*xn;
end

   